import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
//三级联动组件
import TypeNav from '@/components/TypeNav'
//测试请求数据是否成功
import { reqCategoryList } from '@/api/index'
// 引入仓库
import store from '@/store'
//引入mock
import '@/mock/mockServe'
//引入swiper样式
import 'swiper/css/swiper.css'
// 引入全局组件
import Carousel from '@/components/Carousel'
// 在全局引入api方法
import { Button, MessageBox } from 'element-ui'
import * as API from '@/api'
import '@/Paguins/vee'
// import VueLazyload from 'vue-lazyload'
// 全局组件的注册
Vue.component(TypeNav.name, TypeNav)
Vue.component(Carousel.name, Carousel)
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.config.productionTip = false

// Vue.use(VueLazyload)
new Vue({
    // 多了￥route和$router
    Button,
    router,
    beforeCreate() {
        Vue.prototype.$bus = this
        Vue.prototype.$API = API
    },
    // 多了$store
    store,
    render: h => h(App),
}).$mount('#app')